<?php
namespace helper;

use Yii;
use yii\base\Object;

class Logger extends Object
{
    public static $LOG_ROOT_PATH = '/home/work/bkshop_web/logs/'; 
    
    public static function log($data, $target){
        error_log(date("Ymd H:i:s", time())."\t", 3, self::$LOG_ROOT_PATH.$target.'.log');
        error_log(serialize($data)."\n", 3, self::$LOG_ROOT_PATH.$target.'.log');
        error_log("--------------------------------------------------------------------------------------\n", 3, self::$LOG_ROOT_PATH.$target.'.log');
    }
    
}
